﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ZK.HardWareBLL;
using ZK.HardWareIBLL;

namespace ZK.YHP_TransManage.Test
{
    public partial class 地磅 : Form
    {

        ToledoWagonBalanceTCBLL NBKLD39WagonBalance;
        public 地磅()
        {
            InitializeComponent();

        }

        private void WeightCallback(double weight)
        {
            this.Invoke(new Action(() =>
            {
                richTextBox1.Text = richTextBox1.Text + " " + weight;
            }));

        }

        private void Button1_Click(object sender, EventArgs e)
        {
            NBKLD39WagonBalance = new HardWareBLL.ToledoWagonBalanceTCBLL();
            Common.DelegateHelper.WeightCallbackEvent += WeightCallback;
        }
    }
}
